package com.itheima.patterns.builderpattern.factorymethod.factory_method;

public class Client {
    public static void main(String[] args) {
        //创建咖啡店对象
        CoffeeStore coffeeStore = new CoffeeStore();
        //创建具体的咖啡店工厂
        CoffeeFactory factory = new AmericanCoffeeFactory();
        //CoffeeFactory factory = new LatteCoffeeFactory();
        coffeeStore.setFactory(factory);
        //点咖啡
        Coffee coffee = coffeeStore.orderCoffee();
        System.out.println(coffee.getName());
    }
}
